<?php

$form = new AccountSettingsForm();
$form->NewEmailMailModule = 'SocioRating';
$form->NewPasswordMailModule = 'SocioRating';
$form->FormAction();
$form->Render( );

?>
<br />
<br />
<?php
if(session('user')!=null)
{
	$user = UserManager::GetUser(session('user'));
	if($user->facebook == null)
	{
	?>
<div id="fb-root"></div> 
<script src="http://connect.facebook.net/en_US/all.js"></script>
<script>
FB.init({ 
	appId:'245319065513404', cookie:true, 
	status:true, xfbml:true  
});
FB.Event.subscribe('auth.login', function(response) {
	alert(response.authResponse.userID);
});
</script>
<a class="fb_button fb_button_medium" href="https://www.facebook.com/dialog/oauth?client_id=245319065513404&redirect_uri=http://sociorating.com/facebook">
	<span class="fb_button_text">Connect your Facebook</span>
</a>
	<?php 
	}
	else
	{
		?>Facebook: <?php print $user->facebook ?> <a href=""></a><br /><?php
	}
	?>
<br />
<br />
<a href="/deleteaccount">Delete Account</a>
	<?php
}